export default class TimeOut {
  static presentTime(second) {
    let s = 0;
    let i = 0;
    let h = 0;
    s = Math.floor(second / 1) % 60;
    if (s < 10) {
      s = `0${ s }`;
    }
    second = Math.floor(second / 60);
    i = second % 60;
    if (i < 10) {
      i = `0${ i }`;
    }
    second = Math.floor(second / 60);
    h = second % 24;
    if (h < 10) {
      h = `0${ h }`;
    }
    return {
      h: h,
      i: i,
      s: s
    };
  }
  static getAllSeconds(date) { // 获取当前总秒数
    const s = date.getSeconds();
    const h = date.getHours();      
    const m = date.getMinutes(); 
    const allSeconds = s + m * 60 + h * 60 * 60;
    return allSeconds;
  } 
}